<?php
/**
 * Description of ContentEmployee
 *
 * @author Honza
 */
class ContentEmployee implements IMainBodyWithSubMenu {
  public function getContent() {
    $auth = Auth::getInstance();
    if ($auth->hasAuthority(ROLE_EMPLOYEE)) {
      return NavigationEmployee::getContent();
    } else {
      return ACCESS_DENIED;
    }
  }

  public function getSubNavigation() {
    $auth = Auth::getInstance();
    if ($auth->hasAuthority(ROLE_EMPLOYEE)) {
      $submenu = '';
      $submenu .= '<a href="index.php?where=employee&subwhere=books">Books</a> | ';
      $submenu .= '<a href="index.php?where=employee&subwhere=lending">Book lending</a> | ';
      $submenu .= '<a href="index.php?where=employee&subwhere=returning">Book returning</a> | ';
      $submenu .= '<a href="index.php?where=employee&subwhere=libcard">Library cards</a> | ';
      $submenu .= '<a href="index.php?where=employee&subwhere=news">News</a>';
      return $submenu;
    }
  }  
}

?>
